CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

include_directories(${PROJECT_ROOT})
include_directories(${PROJECT_ROOT}/include)
include_directories(${PROJECT_ROOT}/comn/include)
include_directories(${PROJECT_ROOT}/shared)
include_directories(${PROJECT_ROOT}/MediaReader/include)
include_directories(${PROJECT_ROOT}/MediaReader)
include_directories(${PROJECT_ROOT}/MediaRender)

link_directories(${PROJECT_ROOT}/lib)
link_directories(${PROJECT_ROOT}/comn/lib)

link_directories(${FFMPEG_LIBRARY_DIR})

aux_source_directory(. SOURCE)
FILE(GLOB HEADER "*.h")

if (NOCRT)
	set(CMAKE_MFC_FLAG 1)
else()
	add_definitions(-D_AFXDLL)
	set(CMAKE_MFC_FLAG 2)
endif()

add_executable(DemoPlayer WIN32 ${SOURCE} ${HEADER}
    DemoPlayer.rc
    )


target_link_libraries(DemoPlayer
    debug comnd optimized comn
	MediaReader MediaRender
	${FFMPEG_LIBRARIES}
	)

